<template>
  <el-card style="">
    <el-carousel indicator-position="outside">
      <el-carousel-item v-for="(item, index) in banners" :key="index">
        <img class="images" :src="item.imgUrl" />
      </el-carousel-item>
    </el-carousel>
  </el-card>
</template>

<script>
import blueberry from "@/assets/shopImg/blueberry.jpg";
import cherry from "@/assets/shopImg/cherry.jpg";
import green from "@/assets/shopImg/green.jpg";
import coffe from "@/assets/shopImg/coffe.jpg";
import strawberry from "@/assets/shopImg/strawberry.jpg";
import tangerine from "@/assets/shopImg/tangerine.jpg";
export default {
  data() {
    return {
      banners: [
        { imgUrl: blueberry },
        { imgUrl: cherry },
        { imgUrl: green },
        { imgUrl: coffe },
        { imgUrl: tangerine },
        { imgUrl: strawberry }
      ]
    };
  }
};
</script>
<style>
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}
.el-carousel__container {
  height: 400px;
}
.el-card__body {
  padding: 0;
}
.el-card {
  width: 700px;
  margin: auto;
}
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.images {
  height: 100%;
  width: 100%;
}
</style>
